﻿using DAL.Entities;
using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DAL.Configurations
{
    public class AttachmentConfiguration : EntityTypeConfiguration<Attachment>
    {
        public AttachmentConfiguration()
        {
            ToTable("attachment").HasKey(x => x.AttachmentId);
            Property(x => x.FileName).HasMaxLength(500);
            Property(x => x.Extension).HasMaxLength(50);
            Property(x => x.MediaType).HasMaxLength(500);
            Property(x => x.Option).HasMaxLength(100);
            Property(x => x.BusinessId).HasMaxLength(100);

            HasIndex(x => x.BusinessId);
        }
    }
}
